﻿/*
 * Copyright (C) 2014 Cypress Data Defense, LLC    
 * oss@cypressdefense.com
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CypressDefense.Security.Shim
{
    internal class RelativePathConfig
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="RelativePathConfig"/> class.
        /// </summary>
        internal RelativePathConfig()
        {
            CacheControlEnabled = false;
            CachingExpiresEnabled = false;
            CachingPragmaEnabled = false;
            ContentSecurityPolicyEnabled = true;
            XContentTypeOptionsEnabled = true;
            StrictTransportSecurityEnabled = true;
            XFrameOptionsEnabled = true;
            XXssProtectionEnabled = true;
        }

        /// <summary>
        /// Gets or sets the relative path.
        /// </summary>
        /// <value>
        /// The relative path.
        /// </value>
        internal string RelativePath { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether caching is enabled.
        /// </summary>
        /// <value>
        ///   <c>true</c> if [caching enabled]; otherwise, <c>false</c>.
        /// </value>
        internal bool CacheControlEnabled { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [caching expires enabled].
        /// </summary>
        /// <value>
        /// <c>true</c> if [caching expires enabled]; otherwise, <c>false</c>.
        /// </value>
        internal bool CachingExpiresEnabled { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [caching pragma enabled].
        /// </summary>
        /// <value>
        /// <c>true</c> if [caching pragma enabled]; otherwise, <c>false</c>.
        /// </value>
        internal bool CachingPragmaEnabled { get; set; }

        /// <summary>
        /// Gets or sets the pragma header value.
        /// </summary>
        /// <value>
        /// The pragma header value.
        /// </value>
        internal string CachingPragmaHeaderValue { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="RelativePathConfig" /> is enabled.
        /// </summary>
        /// <value>
        ///   <c>true</c> if excluded; otherwise, <c>false</c>.
        /// </value>
        internal bool ContentSecurityPolicyEnabled { get; set; }

        /// <summary>
        /// Gets or sets the CSP header value.
        /// </summary>
        /// <value>
        /// The CSP header value.
        /// </value>
        internal string CSPHeaderValue { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [x content type options] is enabled.
        /// </summary>
        /// <value>
        /// <c>true</c> if [x content type options excluded]; otherwise, <c>false</c>.
        /// </value>
        internal bool XContentTypeOptionsEnabled { get; set; }

        /// <summary>
        /// Gets or sets the content type options header value.
        /// </summary>
        /// <value>
        /// The content type options header value.
        /// </value>
        internal string ContentTypeOptionsHeaderValue { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [strict transport security] is enabled.
        /// </summary>
        /// <value>
        /// <c>true</c> if [strict transport security enabled]; otherwise, <c>false</c>.
        /// </value>
        internal bool StrictTransportSecurityEnabled { get; set; }

        /// <summary>
        /// Gets or sets the HSTS header value.
        /// </summary>
        /// <value>
        /// The HSTS header value.
        /// </value>
        internal string HstsHeaderValue { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [x frame options] is enabled.
        /// </summary>
        /// <value>
        /// <c>true</c> if [x frame options excluded]; otherwise, <c>false</c>.
        /// </value>
        internal bool XFrameOptionsEnabled { get; set; }

        /// <summary>
        /// Gets or sets the x frame options header value.
        /// </summary>
        /// <value>
        /// The x frame options header value.
        /// </value>
        internal string XFrameOptionsHeaderValue { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [x XSS protection] is enabled.
        /// </summary>
        /// <value>
        /// <c>true</c> if [x XSS protection excluded]; otherwise, <c>false</c>.
        /// </value>
        internal bool XXssProtectionEnabled { get; set; }

        /// <summary>
        /// Gets or sets the x XSS protection header value.
        /// </summary>
        /// <value>
        /// The x XSS protection header value.
        /// </value>
        internal string XXssProtectionHeaderValue { get; set; }
    }
}
